<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>商务会员管理系统</title>
<style type="text/css">
body, h1, ul, li {
	padding: 0;
	margin: 0;
}

ul {
	list-style: none;
}

#container {
	width: 980px;
	height:490px;
	margin: 0 auto;
	border: 2px solid #ccc;
}

#container .title {
	width: 100%;
	text-align: center;
	height:50px;
	border: 1px solid green;
}
#container .welcome{
	width: 100%;
	height:30px;
	line-height:30px;
	border: 1px solid blue;
}
#container .main {
	width: 100%;
	height: 100%;
	display: flex;
}

#container .main .menu {
	height:400px;
	border: 1px solid red;
	flex: 1;
}

#container .main .content {
	flex: 4;
	height:400px;
	border: 1px solid orange;
}

</style>
</head>
<body>
	<div id="container">
		<h1 class="title">商务会员管理系统</h1>
		<div class="welcome">
			<span>用户名：<strong id="userName">admin</strong></span> <span>用户类型：<strong id="typeName">管理员</strong></span>
			<a href="#" id="syslogout">退出</a>
		</div>
		<div class="main">
			<div class="menu">
				<ul>
					<li><a href="#" id="modpwd">修改密码</a></li>
					<li><a href="#" id="memberlist">查看所有会员</a></li>
				</ul>
			</div>
			<div class="content">
				<h1>欢迎使用商务会员管理系统</h1>
			</div>
		</div>
	</div>
	
	<!-- 引入jquery.js -->
	<script type="text/javascript" src="static/scripts/jquery.js"></script>
	
	<script type="text/javascript">
		$(function(){
			//jQuery-Ajax清除客户端缓存
			$.ajaxSetup({ cache:false });
			$.post("user/getcurrUser",function(user){
				$("#userName").html(user.name);
				$("#typeName").html(user.userType.name);
			},"json");
			
			$("#modpwd").on("click",function(){
				$(".content").load("modifyPassword.html");
			});
			
			$("#memberlist").on("click",function(){
				$(".content").load("memberList.html");
			});
			
			$("#syslogout").click(function(){
				if(confirm('确定退出系统吗？')){
					$.post("user/logout",function(data){
						window.location.href = data.url;
					},"json");
				}
			});
			
		});
	
	</script>
</body>
</html>